#define  _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main()
{
    int n;
    while (scanf("%d", &n) != EOF)
    {
        int num = 0, tmp = 0;
        for (int i = 0; i < n; i++)
        {
            scanf("%d", &tmp);
            num ^= tmp;
        }
        printf("%d\n", num);
    }
    return 0;
}